package com.ngc.mall.core.enumeration;

import java.util.stream.Stream;

/**
 *
 * 支付方式
 * @author: chenxiaolin
 * @date 2023/8/26 16:46
**/
public enum PayType {
    ALL(0,"所有"),
    WECHAT(1,"微信支付"),
    ALIPAY(2,"支付宝支付");

    private Integer value;

    public int getValue(){
        return this.value;
    }

    PayType(int value,String description) {
        this.value=value;
    }

    public static PayType toType(int value){
        return  Stream.of(PayType.values())
                .filter(c->c.value==value)
                .findAny()
                .orElse(null);
    }
}
